﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NutriStat
{
    /// <summary>
    /// Abstract data type for patient visits
    /// </summary>
    public interface IVisit
    {
        #region Data
        #endregion Data

        #region Properties
        /// <summary>
        /// Gets/sets the date of the visit
        /// </summary>
        DateTime VisitDate { get; set; }

        /// <summary>
        /// Gets/sets the date of the original visit (assuming the VisitDate has been updated)
        /// </summary>
        DateTime OldVisitDate { get; set; }

        /// <summary>
        /// Gets/sets the date the visit information was created
        /// </summary>        
        DateTime CreationDate { get; set; }

        /// <summary>
        /// Gets/sets the date the visit information was last modified
        /// </summary>
        DateTime ModifiedDate { get; set; }

        /// <summary>
        /// Gets/sets the user ID of the person who last modified visit information
        /// </summary>
        string ModifiedBy { get; set; }

        /// <summary>
        /// Gets/sets the age of the patient at the time of the visit
        /// </summary>
        string Age { get; set; }

        /// <summary>
        /// Gets/sets the patient's height in metric units
        /// </summary>
        string HeightMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's height in customary units
        /// </summary>
        string HeightCustomary { get; set; }

        /// <summary>
        /// Gets/sets the patient's weight in metric units
        /// </summary>
        string WeightMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's weight in customary units
        /// </summary>
        string WeightCustomary { get; set; }

        /// <summary>
        /// Gets/sets the patient's weight in ounces units
        /// </summary>
        string WeightOunces { get; set; }

        /// <summary>
        /// Gets/sets whether or not the patient has an edema
        /// </summary>
        bool Edema { get; set; }

        /// <summary>
        /// Gets/sets the patient is recumbent (lying down) at the time of the visit
        /// </summary>
        bool Recumbent { get; set; }

        /// <summary>
        /// Gets/sets the patient's gender. This is normally controlled by the patient
        /// object, but it is needed here for statistical calculations.
        /// </summary>
        string Gender { get; set; }

        /// <summary>
        /// Gets/sets the patient's arm circumference in metric units
        /// </summary>
        string ArmCircumferenceMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's arm circumference in customary units
        /// </summary>
        string ArmCircumferenceCustomary { get; set; }

        /// <summary>
        /// Gets/sets the patient's head circumference in metric units
        /// </summary>
        string HeadCircumferenceMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's head circumference in customary units
        /// </summary>
        string HeadCircumferenceCustomary { get; set; }

        /// <summary>
        /// Gets/sets the patient's triceps skin fold in metric units
        /// </summary>
        string TricepsSkinFoldMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's triceps skin fold in customary units
        /// </summary>
        string TricepsSkinFoldCustomary { get; set; }

        /// <summary>
        /// Gets/sets the patient's subscapular skin fold in metric units
        /// </summary>
        string SubscapularSkinFoldMetric { get; set; }

        /// <summary>
        /// Gets/sets the patient's subscapular skin fold in customary units
        /// </summary>
        string SubscapularSkinFoldCustomary { get; set; }

        /// <summary>
        /// Gets/sets any notes and comments that may exist for this visit
        /// </summary>
        string Notes { get; set; }

        /// <summary>
        /// Gets/sets the body mass index of the patient; note BMI is 
        /// independent of the reference type being used.
        /// </summary>
        string BMI { get; set; }    // BMI independent of reference type

        /// <summary>
        /// Gets/sets the legacy MUAC-for-Age z-score. The legacy MUAC 
        /// z-scores are independent of reference type.
        /// </summary>
        string MUACAgeZ { get; set; } 

        /// <summary>
        /// Gets/sets the legacy MUAC-for-Height z-score. The legacy MUAC 
        /// z-scores are independent of reference type.
        /// </summary>
        string MUACHeightZ { get; set; }
        
        string CDCHAC { get; set; }
        string CDCWHC { get; set; }
        string CDCWAC { get; set; }
        string CDCHAZ { get; set; }
        string CDCWHZ { get; set; }
        string CDCWAZ { get; set; }
        string CDCBMIC { get; set; }
        string CDCBMIZ { get; set; }
        string CDCHCircumC { get; set; }
        string CDCHCircumZ { get; set; }
        double CDCHACd { get; }
        double CDCWHCd { get; }
        double CDCWACd { get; }
        double CDCHAZd { get; }
        double CDCWHZd { get; }
        double CDCWAZd { get; }
        double CDCBMICd { get; }
        double CDCBMIZd { get; }
        double CDCHCircumCd { get; }
        double CDCHCircumZd { get; }
        string CDCFlag { get; set; }
        string CDCBMIFlag { get; set; }
        string CDCHAFlag { get; set; }
        string CDCWAFlag { get; set; }
        string CDCWHFlag { get; set; }

        string WHO1978HAC { get; set; }
        string WHO1978WHC { get; set; }
        string WHO1978WAC { get; set; }
        string WHO1978HAZ { get; set; }
        string WHO1978WHZ { get; set; }
        string WHO1978WAZ { get; set; }
        string WHO1978HAPM { get; set; }
        string WHO1978WHPM { get; set; }
        string WHO1978WAPM { get; set; }
        string WHO1978Flag { get; set; }        

        string WHO2006HAC { get; set; }
        string WHO2006WHC { get; set; }
        string WHO2006WAC { get; set; }
        string WHO2006HAZ { get; set; }
        string WHO2006WHZ { get; set; }
        string WHO2006WAZ { get; set; }
        string WHO2006SSFC { get; set; }
        string WHO2006TSFC { get; set; }
        string WHO2006HCircumC { get; set; }
        string WHO2006BMIC { get; set; }
        string WHO2006MUACC { get; set; }
        string WHO2006SSFZ { get; set; }
        string WHO2006TSFZ { get; set; }
        string WHO2006HCircumZ { get; set; }
        string WHO2006BMIZ { get; set; }
        string WHO2006MUACZ { get; set; }
        string WHO2006HAFlag { get; set; }
        string WHO2006WAFlag { get; set; }
        string WHO2006WHFlag { get; set; }
        string WHO2006BMIFlag { get; set; }
        string WHO2006HeadFlag { get; set; }
        string WHO2006SSFFlag { get; set; }
        string WHO2006TSFFlag { get; set; }
        string WHO2006MUACFlag { get; set; }

        string WHO2007HAC { get; set; }
        string WHO2007HAZ { get; set; }
        string WHO2007WAC { get; set; }
        string WHO2007WAZ { get; set; }
        string WHO2007BMIC { get; set; }
        string WHO2007BMIZ { get; set; }
        string WHO2007HAFlag { get; set; }
        string WHO2007WAFlag { get; set; }
        string WHO2007BMIFlag { get; set; }
        #endregion Properties

        #region Methods
        /// <summary>
        /// Populates the visit object with z-score and percentile statistics
        /// </summary>
        /// <param name="stats">Determines which results to generate; used primarily to
        /// save processing power by skipping results that do not need to be run.</param>
        /// <returns>Whether or not the statistics generation was successful.</returns>
        bool GenerateStatistics(int stats);
        #endregion Methods
    }
}
